// 标签布局公共样式
.tags-layout-container {
  max-width: 1200px
  margin: 0 auto
  padding: 2rem 1rem
  min-height: calc(100vh - 200px)
}

.page-header {
  text-align: center
  margin-bottom: 3rem
  
  .page-title {
    display: flex
    align-items: center
    justify-content: center
    font-size: 2.5rem
    margin-bottom: 1rem
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(1, 162, 190, 0.9))
    -webkit-background-clip: text
    -webkit-text-fill-color: transparent
    background-clip: text
  }
  
  .page-description {
    font-size: 1.1rem
    color: rgba(255, 255, 255, 0.8)
    max-width: 600px
    margin: 0 auto 1rem
  }
  
  .tag-icon {
    display: inline-flex
    margin-right: 0.5rem
    color: rgba(1, 162, 190, 0.9)
    stroke: currentColor
  }
  
  .back-link {
    display: inline-block
    padding: 0.4rem 1rem
    border-radius: 2rem
    background-color: rgba(255, 255, 255, 0.1)
    color: #ffffff
    text-decoration: none
    transition: all 0.3s ease
    font-size: 0.9rem
    
    &:hover {
      background-color: rgba(1, 162, 190, 0.2)
      transform: translateY(-2px)
    }
  }
}

// 标签云样式
.tags-cloud {
  display: flex
  flex-wrap: wrap
  gap: 1rem
  justify-content: center
  padding: 1rem
  max-width: 900px
  margin: 0 auto
}

.tag-item {
  position: relative
  display: flex
  align-items: center
  padding: 0.5rem 1rem
  border-radius: 2rem
  background-color: rgba(255, 255, 255, 0.1)
  color: #ffffff
  text-decoration: none
  transition: all 0.3s ease
  border: 1px solid rgba(255, 255, 255, 0.2)
  overflow: hidden
  
  &::before {
    content: ""
    position: absolute
    top: 0
    left: 0
    width: 100%
    height: 100%
    background: linear-gradient(120deg, rgba(255,255,255,0), rgba(255,255,255,0.1), rgba(255,255,255,0))
    transform: translateX(-100%)
    transition: transform 0.6s
    z-index: 1
  }
  
  &:hover {
    transform: translateY(-3px)
    background-color: rgba(1, 162, 190, 0.2)
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2)
    border-color: rgba(1, 162, 190, 0.5)
    
    &::before {
      transform: translateX(100%)
    }
  }
  
  // 根据标签数量调整大小
  &[data-count="1"] {
    font-size: 0.9rem
    padding: 0.3rem 0.8rem
  }
  
  &[data-count="2"] {
    font-size: 1rem
    padding: 0.4rem 0.9rem
  }
  
  &[data-count="3"] {
    font-size: 1.1rem
    padding: 0.5rem 1rem
  }
  
  &[data-count^="4"], &[data-count^="5"] {
    font-size: 1.2rem
    padding: 0.6rem 1.1rem
  }
  
  &[data-count^="6"], &[data-count^="7"], &[data-count^="8"], &[data-count^="9"] {
    font-size: 1.3rem
    padding: 0.7rem 1.2rem
  }
  
  .tag-name {
    margin-right: 0.5rem
    z-index: 2
  }
  
  .tag-count {
    background-color: rgba(255, 255, 255, 0.2)
    border-radius: 1rem
    padding: 0.1rem 0.4rem
    font-size: 0.8rem
    min-width: 1.5rem
    text-align: center
    z-index: 2
  }
}

.no-tags {
  font-size: 1.2rem
  color: rgba(255, 255, 255, 0.6)
  text-align: center
  padding: 2rem
  width: 100%
}

// 标签详情页样式
.post-list-container {
  max-width: 1200px
  margin: 0 auto
  padding: 1rem
}

.post-list {
  list-style: none
  padding: 0
  margin: 0
  display: grid
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))
  gap: 1.5rem
}

.post-item {
  padding: 1.5rem
  background-color: rgba(255, 255, 255, 0.05)
  border-radius: 0.5rem
  transition: all 0.3s ease
  display: flex
  flex-direction: column
  height: fit-content
  
  &:hover {
    background-color: rgba(255, 255, 255, 0.1)
    transform: translateY(-3px)
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2)
  }
}

.post-link {
  display: block
  text-decoration: none
  color: #ffffff
  margin-bottom: 0.8rem
}

.post-date {
  color: rgba(1, 162, 190, 0.9)
  font-size: 0.9rem
  margin-bottom: 0.5rem
}

.post-title {
  font-size: 1.4rem
  margin: 0
  line-height: 1.3
  transition: color 0.2s
  
  &:hover {
    color: rgba(1, 162, 190, 0.9)
  }
}

.post-tags {
  display: flex
  flex-wrap: wrap
  gap: 0.5rem
  margin-top: 1rem
}

.post-tag {
  font-size: 0.8rem
  padding: 0.2rem 0.6rem
  border-radius: 1rem
  background-color: rgba(255, 255, 255, 0.1)
  color: rgba(255, 255, 255, 0.8)
  text-decoration: none
  transition: all 0.2s ease
  
  &:hover {
    background-color: rgba(1, 162, 190, 0.2)
  }
  
  &.current {
    background-color: rgba(1, 162, 190, 0.3)
    border: 1px solid rgba(1, 162, 190, 0.5)
  }
}

.no-posts {
  font-size: 1.2rem
  color: rgba(255, 255, 255, 0.6)
  text-align: center
  padding: 2rem
  grid-column: 1 / -1
}

// 响应式网格布局
@media (max-width: 1200px) {
  .post-list-container {
    max-width: 1000px
  }
  
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
    gap: 1.2rem
  }
}

@media (max-width: 1024px) {
  .post-list-container {
    max-width: 900px
  }
  
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr))
    gap: 1rem
  }
  
  .post-item {
    padding: 1.2rem
  }
  
  .post-title {
    font-size: 1.2rem
  }
}

@media (max-width: 768px) {
  .post-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))
    gap: 1rem
  }
  
  .post-item {
    padding: 1rem
  }
  
  .post-title {
    font-size: 1.1rem
  }
  
  .post-date {
    font-size: 0.8rem
  }
}

@media (max-width: 480px) {
  .post-list {
    grid-template-columns: 1fr
    gap: 0.8rem
  }
  
  .post-item {
    padding: 0.8rem
  }
  
  .post-title {
    font-size: 1rem
  }
  
  .tags-layout-container {
    padding: 1rem 0.5rem
  }
}